import { createElement } from "react";
import { Input, Select } from "antd";

import { getEnv } from "@/constants";

export const getFilterItems = () => {
  const { commonStatus, commonStatusList } = getEnv().globalConfig;
  return [
    {
      title: "名称",
      name: "dictName",
      gridSpan: 1,
      component: createElement(Input),
    },
    {
      title: "类型",
      name: "dictType",
      gridSpan: 1,
      component: createElement(Input),
    },
    {
      title: "状态",
      name: "status",
      gridSpan: 1,
      component: createElement(Select, { options: commonStatusList, allowClear: true, style: { width: "100%" } }),
      defaultValue: commonStatus.normal,
    },
  ];
}
